<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>后台管理</title>
	</head>
	<body id="behind">
		<div class="header_b">
			<jsp:include page="../common/header.jsp"></jsp:include>
		</div>
		<div class="content_b">
			<h2>
				订单管理
			</h2>
			<div class="search">
				<form action="${ctx }/admin/order/order!search" method="post">
					<fieldset>
						<legend>
							查询
						</legend>
						<div>
							<select name="type">
								<option value="orderId">
									订单号
								</option>
								<option value="memberId">
									会员名
								</option>
							</select>
							<input type="text" name="id" />
							<label>
								是否确认：
								<select name="orderInfo.isConfirm">
									<option value="">
										请选择
									</option>
									<option value="true">
										已确认
									</option>
									<option value="false">
										未确认
									</option>
								</select>
							</label>
							<label>
								是否付款：
								<select name="orderInfo.isPayment">
									<option value="">
										请选择
									</option>
									<option value="true">
										已付款
									</option>
									<option value="false">
										未付款
									</option>
								</select>
							</label>
							<label>
								是否发货：
								<select name="orderInfo.isConsignment">
									<option value="">
										请选择
									</option>
									<option value="true">
										已发货
									</option>
									<option value="false">
										未发货
									</option>
								</select>
							</label>
							<input class="btn_search" type="submit" value="查询" />
						</div>
					</fieldset>
				</form>
			</div>
			<table border="0" cellpadding="0" cellspacing="0" class="table-data">
				<tr>
					<th>
						订单号
					</td>
					<th>
						下订时间
					</th>
					<th>
						货物总额
					</th>
					<th>
						运费
					</th>
					<th>
						总金额
					</th>
					<th>
						配送方式
					</th>
					<th>
						支付方式
					</th>
					<th>
						会员ID
					</th>
					<th>
						购物会员
					</th>
					<th>
						收货人
					</th>
					<th>
						联系电话
					</th>
					<th>
						订单状态
					</th>
					<th>
						操作
					</th>
				</tr>
				<c:forEach items="${orderInfoP.result}" var="item">
					<tr>
						<td>
							${item.id }
						</td>
						<td>
							${item.orderDate }
						</td>
						<td>
							${item.goodsFee }
						</td>
						<td>
							${item.shipFee }
						</td>
						<td>
							${item.totalPrice }
						</td>
						<td>
							快递（申通）
						</td>
						<td>
							网银支付
						</td>
						<td>
							${item.member.name }
						</td>
						<td>
							${item.member.trueName }
						</td>
						<td>
							${item.address.name }
						</td>
						<td>
							${ (empty
							item.address.mobilephone)?item.address.telephone:item.address.mobilephone}
						</td>
						<td>
							${item.isConfirm==true?"已确认":"未确认"
							}|${item.isPayment==true?"已付款":"未付款"
							}|${item.isConsignment==true?"已发货":"未发货" }
						</td>
						<td>
							<a href="${ctx }/admin/order/order!getOrder?id=${item.id }">管理</a>|
							<a href="${ctx }/admin/order/order!deleteById?id=${item.id }">删除</a>
						</td>
					</tr>
				</c:forEach>
			</table>
		</div>
	</body>
</html>
